/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.nii.qlks.ControlLayer;

import edu.nii.qlks.BusinessLogicLayer.KhachHangBLL;
import edu.nii.qlks.BusinessLogicLayer.LoaiKhachHangBLL;
import edu.nii.qlks.DataTransferObject.KhachHangInfo;
import edu.nii.qlks.DataTransferObject.LoaiKhachHangInfo;
import java.util.ArrayList;

/**
 *
 * @author MARS_NHO
 */
public class KhachHangControl {
    KhachHangBLL KhachHang = new KhachHangBLL();
    LoaiKhachHangBLL loaikhachhang = new LoaiKhachHangBLL();
    
    public ArrayList LayDS() throws Exception{
        return KhachHang.LayDS();
    }
     
    public ArrayList LayDS(String Condition) throws Exception{
        return KhachHang.LayDS(Condition);
    }
    
    public void Insert(KhachHangInfo khachHangInfo) throws Exception{
        KhachHang.Insert(khachHangInfo);
    }
    
    public void Update(KhachHangInfo khachHangInfo) throws Exception{
        KhachHang.Update(khachHangInfo);
    }
    
    public void Delete(KhachHangInfo khachHangInfo) throws Exception{
        KhachHang.Delete(khachHangInfo);
    }
    
    public String TaoMaTuDong(String maGoc, int batDau){
         return KhachHang.TaoMaTuDong(maGoc, batDau);
     }
    
    public ArrayList LayDS_Khachhang() throws Exception {
        return KhachHang.LayDS_Khachhang();
    }
    
    public String[] LayTenKhachhang() throws Exception {
        return KhachHang.LayTenKhachHang();
    }
    
    public String[] LayCMND() throws Exception {
        return KhachHang.LayCMND();
    }
    
    public String[] LayTenLoaiKhachHang() throws Exception {
        return KhachHang.LayTenLoaiKhachHang();
    }
    
    public ArrayList TimKiemKhachHangDangthue(KhachHangInfo khachhang, LoaiKhachHangInfo loaikhach) throws Exception {
        return KhachHang.TimKiemKhachHangDangthue(khachhang, loaikhach);
    }
    
    public ArrayList TimKiemKhachHangDatra(KhachHangInfo khachhang, LoaiKhachHangInfo loaikhach) throws Exception {
        return KhachHang.TimKiemKhachHangDatra(khachhang, loaikhach);
    }
}
